﻿using System;
using System.Collections.Generic;

class BinarySearch
{
    static void Main()
    {
        Console.WriteLine("Enter number of elements:");
        int arrayLength = int.Parse(Console.ReadLine());
        int[] arrayOfInts = new int[arrayLength];
        for (int index = 0; index < arrayLength; index++)
        {
            Console.WriteLine("Enter element {0}", index);
            arrayOfInts[index] = int.Parse(Console.ReadLine());
        }
        Array.Sort(arrayOfInts);
        Console.WriteLine("The sorted array is:");
        for (int j = 0; j < arrayOfInts.Length; j++)
        {
            Console.WriteLine(arrayOfInts[j]);
        }
        Console.WriteLine("Enter the number you are looking for:");
        int numberSearched = int.Parse(Console.ReadLine());
        int middleOfArray = (arrayOfInts.Length) / 2;
        
        

    }
}


